package com.songhq.data.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.songhq.data.kafka.producer.ProductKafka;

@RestController
@RequestMapping("/kafka")
public class KafkaController {
	
	@Autowired
	private ProductKafka productKafka;
	
	@RequestMapping("/product")
	public String getUserTest() throws Exception {
		
		productKafka.send("foo","message");
		productKafka.send1("foo","message");
		productKafka.send2("foo","message");
		productKafka.send3("foo","message");
		return "消息发送成功";
	}
	
	
	

}
